﻿Imports System.Reflection

Public Class Plugin
    Implements UCBase.I_Plugin
    Private DevList As New List(Of UCBase.UCSDevice)

    Public ReadOnly Property Devices() As System.Collections.Generic.List(Of UCBase.UCSDevice) Implements UCBase.I_Plugin.Devices
        Get
            Return DevList
        End Get
    End Property

    Public WriteOnly Property Resources() As UCBase.ResourceManager Implements UCBase.I_Plugin.Resources
        Set(ByVal value As UCBase.ResourceManager)

        End Set
    End Property

    Public Sub Unload() Implements UCBase.I_Plugin.Unload

    End Sub

    Public Function GetDevice(ByVal Name As String) As System.Windows.Forms.Control Implements UCBase.I_Plugin.GetDevice
        If Name = "Red2BW" Then Return New Red2BW 'Get Control from Reference Name
        If Name = "Green2BW" Then Return New Green2BW 'Get Control from Reference Name
        If Name = "Blue2BW" Then Return New Blue2BW 'Get Control from Reference Name
        If Name = "BrightnessFilter" Then Return New BrightnessFilter 'Get Control from Reference Name
        If Name = "ContrastFilter" Then Return New ContrastFilter 'Get Control from Reference Name
        If Name = "ColorAdjust" Then Return New ColorAdjust 'Get Control from Reference Name
        If Name = "BrightnessContrastColor" Then Return New ContrastBrightnessColor 'Get Control from Reference Name
        If Name = "InvertFilter" Then Return New InvertFilter 'Get Control from Reference Name
        If Name = "GrayScaleFilter" Then Return New GrayScaleFilter 'Get Control from Reference Name
        If Name = "RedPassFilter" Then Return New RedPassFilter 'Get Control from Reference Name
        If Name = "GreenPassFilter" Then Return New GreenPassFilter 'Get Control from Reference Name
        If Name = "BluePassFilter" Then Return New BluePassFilter 'Get Control from Reference Name
        Return Nothing
    End Function

    Public Sub New()
        DevList.Add(New UCBase.UCSDevice("Red to BW", "Red2BW", "Transform Filters", "Red to BW"))
        DevList.Add(New UCBase.UCSDevice("Green to BW", "Green2BW", "Transform Filters", "Green to BW"))
        DevList.Add(New UCBase.UCSDevice("Blue to BW", "Blue2BW", "Transform Filters", "Blue to BW"))
        DevList.Add(New UCBase.UCSDevice("Brightness Adjust", "BrightnessFilter", "Adjustment Filters", "Brightness Adjust"))
        DevList.Add(New UCBase.UCSDevice("Contrast Adjust", "ContrastFilter", "Adjustment Filters", "Contrast Adjust"))
        DevList.Add(New UCBase.UCSDevice("Color Adjust", "ColorAdjust", "Adjustment Filters", "Color Adjust"))
        DevList.Add(New UCBase.UCSDevice("Brightness + Contrast + Color Combo", "BrightnessContrastColor", "Adjustment Filters", "Brightness + Contrast + Color Combo"))
        DevList.Add(New UCBase.UCSDevice("Invert Image", "InvertFilter", "Transform Filters", "Invert Image Filter"))
        DevList.Add(New UCBase.UCSDevice("GrayScale", "GrayScaleFilter", "Transform Filters", "GrayScale Image Filter"))
        DevList.Add(New UCBase.UCSDevice("Red Pass", "RedPassFilter", "Transform Filters", "Red Pass Filter"))
        DevList.Add(New UCBase.UCSDevice("Green Pass", "GreenPassFilter", "Transform Filters", "Green Pass Filter"))
        DevList.Add(New UCBase.UCSDevice("Blue Pass", "BluePassFilter", "Transform Filters", "Blue Pass Filter"))

    End Sub
End Class
